package com.example.futureai;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class FutureaiApplication {

    public static void main(String[] args) {
        /*String apiKey = "457168d9deac0f5c56b99dcc7e193124";
        String apiUrl = "http://apis.juhe.cn/fapig/calendar/day";
        String params = "key=" + apiKey + "&date=2025-07-04&detail=1";
        String content = HttpUtil.get(apiUrl+"?"+params);
        System.out.println(content);
        //转为json对象
        JSONObject jsonObject = JSONUtil.parseObj(content);
        String reason = (String) jsonObject.get("reason");
        if("success".equals(reason)){
            JSONObject res = (JSONObject) jsonObject.get("result");
            String status = (String)res.get("status");
            String statusDesc = (String)res.get("statusDesc");
            if("2".equals(status) || "工作日".equals(statusDesc)){
                System.out.println("工作日工作日工作日工作日工作日");
            }else{
                System.out.println("放假放假放假放假放假放假");
            }
        }*/

        SpringApplication.run(FutureaiApplication.class, args);
    }

}
